<?php
/**
	页面执行时间类


**/
/*	class runtime{
		
		var $StarTime = 0;
		var $SotpTime = 0;
		
			
		function get_microtime(){
			list($_usec,$_sec)=explode(" ",microtime());
			return ((float)$_usec + (float)$_sec);		
		}
		
		function start(){
			return $this->StarTime = $this->get_microtime();
			
		}
		
		function stop(){
			return $this->SotpTime=$this->get_microtime();	
		}
		
		function spent(){
			return round(($this->SotpTime - $this->StarTime)*1000);	
		}
	}
	
	$test =new runtime;*/
	
	  $start=microtime(true);
	
	$_array=array(
		'adminname' =>'ddd',
		'nip'       =>'fff',
		'nlog'      =>'dfsdfr44',
		'ndate'     =>time(),
		'ktext'     =>'r3434',
		'adminname1' =>'ddd',
		'nip1'       =>'fff',
		'nlog1'      =>'dfsdfr44',
		'ndate1'     =>time(),
		'ktext1'     =>'r3434',

		);
	$_fields=array();
	$_values=array();
	foreach($_array as $_key=>$_val){
		array_push($_fields,$_key);
		array_push($_values,$_val);
	}

	$_sql='insert into article ('.implode(',',$_fields).') values (\''.implode('\',\'',$_values).'\');';
	echo $_sql;
	 $end=microtime(true);
	 
	echo "<br/>页面执行时间: ($end-$start) 毫秒";/**/
	
	
	echo '<br/>';
	
	 $start1=microtime(true);
	
	$_array1=array(
				'adminname' =>'ddd',
		'nip'       =>'fff',
		'nlog'      =>'dfsdfr44',
		'ndate'     =>time(),
		'ktext'     =>'r3434',
		'adminname1' =>'ddd',
		'nip1'       =>'fff',
		'nlog1'      =>'dfsdfr44',
		'ndate1'     =>time(),
		'ktext1'     =>'r3434',
		);
	$_fields1=array();
	$_values1=array();
	foreach($_array1 as $_key=>$_val){
		$_fields1[]=$_key;
		$_values1[]=$_val;
	}

	$_sql1='insert into article ('.implode(',',$_fields1).') values (\''.implode('\',\'',$_values1).'\');';
	echo $_sql1;
	 $end1=microtime(true);
	 
	echo "<br/>页面执行时间: ($end1-$start1) 毫秒";
	
	
	
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>

</body>
</html>